//
//  UIButton-Extension.swift
//  weibo27
//
//  Created by 董浩 on 16/4/19.
//  Copyright © 2016年 donghao. All rights reserved.
//

import UIKit
extension UIButton {


    convenience init(imageName:String,backImageName:String) {
    
        self.init()
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setImage(UIImage(named: imageName + "_highlighted"), forState: UIControlState.Highlighted)
        setBackgroundImage(UIImage(named: backImageName), forState: UIControlState.Normal)
        setBackgroundImage(UIImage(named: backImageName + "_highlighted"), forState: UIControlState.Highlighted)
        
        //设置按钮的尺寸
        sizeToFit()

    
    
    
    
    
    }






}
